package com.rizzo.back.domain;

import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.hibernate.search.annotations.*;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

/**
 * TODO Insert JavaDoc!
 */
@Entity
@Indexed
@Analyzer(impl = StandardAnalyzer.class)
public class Synonym {

    private int id;

    private String syn;

    private String word;

    /**
     * Method getId returns the id of this Synonym object.
     *
     * @return the id (type int) of this Synonym object.
     */
    @Id
    @DocumentId
    public int getId() {
        return id;
    }

    /**
     * Method setId sets the id of this Synonym object
     *
     * @param id of type int
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * Method getSyn returns the syn of this Synonym object.
     *
     * @return the syn (type String) of this Synonym object.
     */
    @Field(store = Store.YES, index = Index.UN_TOKENIZED)
    @Column(length = 1000)
    public String getSyn() {
        return syn;
    }

    /**
     * Method setSyn sets the syn of this Synonym object
     *
     * @param syn of type String
     */
    public void setSyn(String syn) {
        this.syn = syn;
    }

    /**
     * Method getWord returns the word of this Synonym object.
     *
     * @return the word (type String) of this Synonym object.
     */
    @Field(store = Store.YES, index = Index.UN_TOKENIZED)
    public String getWord() {
        return word;
    }

    /**
     * Method setWord sets the word of this Synonym object
     *
     * @param word of type String
     */
    public void setWord(String word) {
        this.word = word;
    }

}
